package com.uex.dev.manage.admin.vo.project;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.uex.dev.manage.admin.po.ProjectVersionPO;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import org.springframework.beans.BeanUtils;

import java.time.LocalDateTime;

/**
 * @author lzs
 * @create 2024/03/04
 * @description
 */
@Schema(description = "查看项目版本列表响应参数")
@Data
public class ProjectVerListResp {
    @Schema(description = "版本Id")
    private Integer id;
    @Schema(description = "版本标题")
    private String verTitle;
    @Schema(description = "版本更新时间")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private LocalDateTime verTime;

    public static ProjectVerListResp fromPO(ProjectVersionPO projectVersionPO) {
        ProjectVerListResp projectVerListResp = new ProjectVerListResp();
        BeanUtils.copyProperties(projectVersionPO, projectVerListResp);
        return projectVerListResp;
    }
}

